package com.merelyb.data.service.service.service.dict;

import com.merelyb.data.service.common.MultiDataSourceContextHolder;
import com.merelyb.data.service.service.mybatis.bean.dict.DictArea;
import com.merelyb.data.service.service.mybatis.dao.dict.DictAreaDao;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * Created by LiM on 2017/11/16.
 */
@Service
public class DictAreaService {
    @Autowired
    DictAreaDao dictAreaDao;

    /**
     * 批量新增数据
     *
     * @param dictAreaList
     * @throws Exception
     */
    public void addData(List<DictArea> dictAreaList) throws Exception {
        dictAreaDao.addData(dictAreaList, MultiDataSourceContextHolder.DATA_DICT);
    }
}
